import 'package:flutter/material.dart';
import 'package:flutter_webview_plugin/flutter_webview_plugin.dart';
import 'package:jicaimao_flutter/widget/app_bar.dart';

class WebPage extends StatefulWidget {
  String title;
  String url;

  @override
  _WebPageState createState() => new _WebPageState();

  WebPage(this.title,this.url);
}

class _WebPageState extends State<WebPage> {
  Future<bool> _requestPop() {
    Navigator.pop(context);

    ///弹出页面并传回int值100，用于上一个界面的回调
    return new Future.value(false);
  }

  @override
  Widget build(BuildContext context) {
    // TODO: implement build
    return new WillPopScope(
        onWillPop: (){
          //TODO 返回处理
        },
        child: new WebviewScaffold(
          url: widget.url,
          appBar:AppBarNormal(widget.title),

          ),
        );
  }
}
